<!DOCTYPE html>
<html>
<head>

<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">

<!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
<script src="${request.getContextPath()}/themes/admin/js/jquery.js" type="text/javascript"></script>
<script type="text/javascript" src="${webroot}/plugins/tree/js/jquery.ztree.all-3.5.min.js"></script>
<script src="${request.getContextPath()}/plugins/timepicker/WdatePicker.js" type="text/javascript"></script>
<script src="${request.getContextPath()}/themes/admin/js/ajax.js" type="text/javascript"></script>
<script src="${request.getContextPath()}/themes/admin/js/admin.js" type="text/javascript"></script>
<script src="${request.getContextPath()}/themes/admin/js/base.js" type="text/javascript"></script>
<script src="${request.getContextPath()}/themes/admin/js/adminBasis.js" type="text/javascript"></script>
<script src="${request.getContextPath()}/themes/admin/js/area.js" type="text/javascript"></script>
<script src="${request.getContextPath()}/themes/admin/js/jquery.cookie.js" type="text/javascript"></script>  
</head>
<body class="full">
			<div id="s_main" class="clearfix">
					<div class="valBox w750">
						<div class="val clearfix">
							<ul>
								<li>
									<div class="s_title">银行卡号:</div>
									<div class="v">
										<input id = "bankcardNo2" type="text" name="bankCardNo" value="" />
									</div>
								</li>
								<li>
									<div class="s_title">身份证号后8位:</div>
									<div class="v">
										<input id = "cardId2" type="text" name="cardId" value="" />
									</div>
								</li>
							</ul>
							<div class="other">
								<input type="hidden"  id="bankcardId" value="${bankCardInfo.id?c}" />
								<input id="submitBtn" type="submit" name="reset" value="解绑" />
							</div>
							
						</div>
					</div>
		</div>
</body>

	<script type="text/javascript">
		$("#submitBtn").click(function(){
	    	var cardId = $("#cardId2").val();
	    	var bankcardNo = $("#bankcardNo2").val();
			var bankcardId = $("#bankcardId").val();
			if(cardId!=''&&bankcardNo!=''){
				$.ajax({
					type:"post",
					url:"/admin/bankcard/verifyCard.html",
					data:{
						"cardId":cardId,
						"bankcardNo":bankcardNo,
						"bankcardId":bankcardId
					},
					
					success:function(data){
						if(data.resultCode==1){
							alert("解绑成功");
							location.href="/admin/bankcard/bankcardInfoList.html?search=true&userName=${search_userName}&phone=${search_phone}&cardId=${search_cardId}&bankCardNo=${search_bankCardNo}";
						}else if(data.resultCode==0 && data.resultMsg){
							fnShowReturn($("input[id='submitBtn']"),data.resultMsg);
						}else{
							alert(url);
							fnShowReturn($("input[id='submitBtn']"),"非法操作！如有疑问，请联系管理员！");
						}
					}
				});
			}else{
				$("#returnInfo").remove();
				$("#submitBtn").before('<span class="return_info" id="returnInfo">'+'银行卡号&身份证号不能为空'+'</span>');
			}
	    });
		

		function fnShowReturn(obj,html){
			$("#returnInfo").remove();
			obj.before('<span class="return_info" id="returnInfo">'+html+'</span>');
		}
		
	</script>    
</html>





